/**
 * 
 */
package de.nak.roommgmt;

import java.util.Date;

import javax.servlet.ServletException;

import org.apache.commons.beanutils.ConvertUtils;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;

/**
 * A custom plugin that registers converters.
 * @author Stephan Anft
 */
public class ConverterRegistrationPlugin implements PlugIn {

	/** {@inheritDoc} */
	public void destroy() {
		// Do nothing
	}

	/** {@inheritDoc} */
	public void init(ActionServlet servlet, ModuleConfig config)
			throws ServletException {
		ConvertUtils.register(new DateTimeConverter(), Date.class);
	}

}
